home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
ffspas.zip
/
READ.ME
< prev
Wrap
Text File
|
1993-01-04
|
22KB
|
790 lines
FINAL FRONTIER SOFTWARE
FFSPAS PROCEDURES FOR TURBO PASCAL
524 Rock Avenue
Chestertown, New York 12817
Tel. 518-494-4097
Voice and Data
Support
for registered
Owners of the FFSPAS addons is
provided through the FINAL FRONTIER BBS.
Final Frontier BBS
(518) 761-0869
1200-2400-9600 N-8-1
Queensbury, New York
Registered
owners of the
FFSPAS addons may obtain the
latest version of the procedures complete
with source code through the Final Frontier BBS.
Recompilation of the units
require Technojock(tm) Toolkit 5.0-5.02
and
the TPBCD unit from Turbo Profesional(tm) which
must be purchased from the vendor(s).
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 2
These units were developed using the TECHNOJOCK(tm) Toolkit.
TECHNOJOCK is a trademark of the Technojock Toolkit for Turbo
Pascal by Technojock Software, Inc.
The calc55 unit was developed with the TECHNOJOCK Toolkit and
with Turbo Power's Turbo Professional 5.0(tm) TPBCD unit.
This archive is released without explicit or implicit, expressed,
or implied warranties of any kind, including, without limitation,
any warranties of fitness for a particular purpose.
The authors shall not be liable for any damage whether
direct, indirect, special or consequential arising from failure
of any or all of the enclosed programs to operate in the manner
desired by the user(s). The authors shall also not be liable for
any damage to data or property that may be caused directly or
indirectly by the use of this program.
In no event will the authors be liable to the user(s) for any
damages, including any lost profits, lost savings or other
consequential or incidental damages arising out of the use, misuse
or inability to use the programs, or FOR ANY CLAIM BY ANY OTHER
PARTY. By using any or all of the enclosed programs, you
acknowledge that you have read every part of this document and
have agreed with each and all provisions of the present disclaimer.
*YOU USE THESE UNITS SOLELY AT YOUR OWN RISK*
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 3
Documentation
For
FFSPAS Units
(C) 1990 Final Frontier Software
Version 1.0
FILES ON THIS DISK
------------------
COLRCALC.ZIP contains the following files:
Turbo Pascal 5.0 and 5.5 TPU's
CALC55.TPU A Turbo Pascal 5.5 Calculator TPU.
CALC50.TPU A Turbo Pascal 5.0 Calculator TPU.
COLOR55.TPU A Turbo Pascal 5.5 color TPU.
COLOR50.TPU A Turbo Pascal 5.0 color TPU.
If you are using Turbo Pascal 5.5 use the COLOR55 and/or the CALC55 TPU's.
If you are using Turbo Pascal 5.0 use the COLOR50 and/or the CALC50 TPU's.
┌───────────────────────── !!! N O T E !!! ────────────────────────────┐
│ │
│ Turbo Professional's (tm) 5.0 TPBCD.TPU and Technojock's Toolkit is │
│ required to create programs that use the CALCULATOR TPU. Because CALC55 │
│ uses the TPBCD unit this unit must be located in your default TPU │
│ directory inorder to write programs that use the CALC55 unit. THESE UNITS │
│ MUST BE OBTAINED from TECHNOJOCK and TURBO POWER. │
│ │
│ Both toolkits may be obtained from the appropriate vendor. │
│ │
└───────────────────────── !!! N O T E !!! ────────────────────────────┘
Demonstration Files
DEMO.PAS A demo program to show how to use the color and
calculator unit in a full program complete with NESTTTT5
menus.
DCALCU.PAS A pascal program to demonstrate the calculator unit.
DCOLOR.PAS A pascal program to demonstrate the color unit.
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 4
Executable Demonstration Files
DCALCU.EXE Compiled version of CALC.PAS.
DCOLOR.EXE Compiled version of DEMOCOLO.PAS.
DEMO.EXE Compiled version of DEMO.PAS
Documentation Files
READ.ME This documentation file.
Technojock (tm) is the trade name of a Turbo Pascal toolkit produced by
Technojock Software, Inc.
This product is not produced or supported by Technojock Software, Inc. and
the name Technojock is not associated with the author in any way. This is
not to "knock" Technojock in any way, it's merely stated to protect me.
The Technojock Toolkit is a wonderful collection of functions and
procedures that rival most on the market. The Technojock Toolkit is
probably the best toolkit for Pascal bar none. The toolkit is also one of
the simplest to use and is supported very well. I encourage all who use
the toolkit to register it. It is well worth the money.
It is hoped that the style of these procedures provide an extra measure
of utility for current users of the Technojock Toolkit by providing a
means to change screen colors and to incorporate the use of a calculator
in the programs you write. Both procedures augment existing toolkit
functions but DO NOT compete with any of the toolkit functions.
At the time of development of these add-on units the current version of
the Technojock Toolkit was 5.02 and Turbo Professional was 5.0.
The first release of the toolkit add-ons incorporates two easy to use
turbo pascal 5.0 or 5.5 units called Calc and Color. Each of the units
brings power and ease of use to programming with Turbo Pascal.
Mouse Support
-------------
If a mouse is detected, the mouse version of the unit is called whereby
all functions are performed through the mouse. If a mouse is NOT detected,
a keyboard version of the calculator or color procedure is displayed. All
calculator or color functions are performed through use of the keyboard OR
mouse. Support of BOTH the keyboard and mouse AT THE SAME time is not
possible in this release of the ADDON units because the Technojock (tm)
GetKey procedure does not provide both keyboard and mouse support at the
same time.
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 5
Future releases of this software may incorporate support of both the
keyboard and mouse if Technojock's version 6.0 release GetKey procedure
supports this function with a free floating mouse cursor.
=============
FFSPAS Unit
=============
- COLOR -
INTRODUCTION
------------
This TURBO PASCAL UNIT contains one procedure to display a mouse or
keyboard driven display to select foreground and background screen
colors. Selected colors are returned in the following variables:
forecolor : integer - foreground color
backcolor : integer - background color
The unit also returns the following:
forecolorsel : string - foreground color in English as a string
backcolorsel : string - background color in English as a string
The color unit automatically detects the presence of a color screen or
a mouse, adjusts itself accordingly and functions well with either
the mouse or keyboard.
KeyBoard Movement:
Use left arrow, right arrow, home, end, pgup and pgdn keys to move
cursor box. Use tab or shift tab to jump from a foreground to a background
window. Press enter in foreground or background window to select default
color.
Mouse Movement:
Use mouse to move mouse cursor. Press left button to select default
color. To Exit place mouse cursor on exit button and press left button.
The color procedure provides: mouse support
automatic mouse detection
automatic color screen detection
PROCEDURE SUMMARY
-----------------
Color(ForeColorSel, BackColorSel, ForeColor, BackColor);
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 6
EXAMPLES
--------
PROGRAM test_color;
USES crt, fastttt5, strnttt5, keyttt5, winttt5,
miscttt5, color, nestttt5, calc;
VAR
ch : CHAR;
BEGIN
IF numon THEN Set_Num(FALSE);
Offcursor;
CLRSCR;
Color(ForeColorSel, BackColorSel, ForeColor, BackColor); GOTOXY(1, 5);
Mkwin(10, 2, 70, 12, forecolor, backcolor, 1); Writebetween(11, 69, 2,
forecolor, backcolor, ' NESTTTT5 Color Attributes '); Writeat(12, 3,
forecolor, backcolor, ' The foreground attribute is: ' + '(' +
int_to_str(forecolor) + ')');
Writeat(12, 4, forecolor, backcolor, ' The background attribute is: '
+ '(' + int_to_str(backcolor) + ')');
Writeat(12, 5, nttt.boxfcol, backcolor, ' The Border foreground attribute
is: ' + '(' + int_to_str(nttt.boxfcol) + ')');
Writeat(12, 6, forecolor, nttt.boxbcol, ' The Border background
attribute is: ' + '(' + int_to_str(nttt.boxbcol) + ')');
Writeat(12, 7, nttt.capfcol, backcolor, ' First Capital letter
foreground attribute is: ' + '(' + int_to_str(nttt.capfcol) + ')');
Writeat(12, 8, nttt.norfcol, backcolor, ' Normal menu topics
foreground attribute is: ' + '(' + int_to_str(nttt.norfcol) + ')');
Writeat(12, 9, nttt.lofcol, backcolor, ' Non-selected menu topic
foreground attribute is: ' + '(' + int_to_str(nttt.lofcol) + ')');
Writeat(12, 10, nttt.hifcol, backcolor, ' Selected menu topic
foreground attribute is: ' + '(' + int_to_str(nttt.hifcol) + ')');
Writeat(12, 11, forecolor, nttt.hibcol, ' Selected menu topic
background attribute is: ' + '(' + int_to_str(nttt.hibcol) + ')');
IF moused THEN writeAT(20, 25, white, black, 'Press a key, a
mousekey, or move the mouse');
IF NOT moused THEN writeAT(34, 25, white, black, 'Press a key ...');
DELAY(500);
ch := getkey;
IF windowcounter > 0 THEN FOR i = 1 to windowcounter DO rmwin;
Reset_Startup_Mode;
GOTOXY(1, 2);
Clearline(1, white, blue);
WriteCenter(1, white, blue, '(C) Copyright 1990 Final Frontier Software');
Beep;
END.
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 7
=========================================================================
PROCEDURE COLOR
-------------------------------------------------------------------------
Purpose: Displays a screen to select foreground and background color
attributes for the main program.
Declaration: Color(ForeColorSel, BackColorSel: string; ForeColor,
BackColor: integer);
Returns: Integer and String
An integer containing a CRT compatible value for the
foreground color attribute (ie: 15) is returned in ForeColor;
An integer containing a CRT compatible value for the
background color attribute (ie: 4) is returned in BackColor;
A string containing a value for the foreground color
attribute (ie: white) is returned in ForeColorSel.
A string containing a value for the background color
attribute (ie: red) is returned in BackColorSel.
Remarks: None
Example #1:
BEGIN
Color(ForeColorSel, BackColorSel, ForeColor, BackColor);
TEXTCOLOR(forecolor);
TEXTBACKGROUND(backcolor);
CLRSCR;
Writeln('The new foreground color is', forecolorsel,'(',forecolor,')';
Writeln('The new background color is', backcolorsel,'(',backcolor,')'
END;
Example #2:
{$F+}
PROCEDURE Action(var code : integer; var finish : byte);
{THIS PROCEDURE CHECKS FOR MENU SELECTIONS USING NESTTT5;
BEGIN
CASE code OF
...
...
801 : BEGIN {Screen Colors}
finish := dontclear;
Color(ForeColorSel, BackColorSel,ForeColor, BackColor );
foreground := forecolor;
background := backcolor;
TEXTCOLOR(foreground);
TEXTBACKGROUND(backcolor);
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 8
finish := dontclear;
Show_Nest(mainmenu);
END;
...
...
END; {case}
END; {procedure}
{$F-}
Additional examples of program code demonstrating use of the color unit are
provided in the demonstration programs Color and Demo.
=============
FFSPAS Unit
=============
- CALC -
The CALC unit contains one procedure to display a mouse or keyboard
driven calculator with one call.
The calculator supports : addition
subtraction
multiplication
division with divide by zero trap
square root
one memory function
cut and paste from display tape
mouse support
help screens
user established default colors
automatic mouse detection
automatic color screen detection
The calculator unit automatically detects the presence of a color screen
or a mouse, adjusts itself accordingly and functions well with either a
mouse or keyboard.
CHANGING THE DEFAULT CALC VARIABLES
---------------------------------------
The interface section if the CALC unit includes a variable CTTT of Type
ColorDisplay. The elements of the CTTT records have established defaults
and do not require modification. The programmer can change the default
elements as follows:
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 9
CTTT is defined as follows:
Fore := black; Calculator foreground attribute
Back := cyan; Calculator background attribute
statusfore := white; Status line and mouse buttons foreground attr
statusback := blue; Status line and mouse buttons background attr
tapefore := white; Calculator tape foreground attribute
tapeback := black; Calculator tape background attribute
highlight := red; Calculator selection key Foreground attribute
Points := 2; Number of decimal points - default = 2
delaytime := 100; User adjustable variable for sensitivity of
Mouse buttons.
Examples of how to change global defaults of the calculator unit is
provided in the demonstration programs.
PROCEDURE SUMMARY - Calculator;
-----------------
SIMPLE EXAMPLE
--------------
PROGRAM TestIt;
Uses CALC;
BEGIN
Calculator
END.
=========================================================================
PROCEDURE CALCULATOR
-------------------------------------------------------------------------
Purpose: Displays a calculator on the screen.
Declaration: Calculator
Returns: None
Remarks: None
NestTT5 Example:
{$F+}
PROCEDURE Action(var code : integer; var finish : byte);
{THIS PROCEDURE CHECKS FOR MENU SELECTIONS USING NESTTT5;
BEGIN
CASE code OF
...
...
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 10
1500: begin {Calculator}
If moused then CTTT.delaytime := 100; ──┐
If not moused then CTTT.delaytime := 0; ──┘ Necessary to
CTTT.points := 2; slow down mouse
Calculator; {calls calculator} sensitivity.
Assign_Idle_Hook(Dummy);
finish := refreshmenu;
END;
...
...
END; {case}
END; {procedure}
{$F-}
DISTRIBUTION
------------
Please feel free to copy and distribute this software providing
the following conditions are met:
1 - This documentation MUST be included with the files in
library/compressed (.ZIP) format. This means that the files have been
combined into one file.
2 - No fee or consideration may be charged, however a distribution cost
may be charged for the cost of diskettes and shipping and handling.
Fee not to exceed $5.00.
3 - The files may NOT be distributed in modified form.
4 - This product may not be combined or "bundled" with any other product
or service.
5 - This product may not be rented leased to others or used in commercial
or shareware programs unless registered.
These TPU's are released as shareware. If you use it and like it, please
support the author's development and improvement of the FFSPAS Units by
sending a check or money order for $5.00 for each unit. Registered users of
the units will receive the source code plus free phone support.
Upgrades will be available FREE to registered owners from The Final Frontier
BBS (1200-2400-9600 HST), Glens Falls, New York (518) 761-0869.
If anyone has developed their own add-on units that are compatible with the
TECHNOJOCK Toolkit(tm) and would like to swap procedures or have them
added to the FFSPAS units, please drop me a letter.
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 11
Acknowledgements:
-----------------
The author wishes to thank Brian Dunworth of the Final Frontier BBS in
Glens Falls, New York (518) 761-0869 for his diligence in reporting bugs
during the alpha and beta stages of software testing. Brian is co-owner of
these procedures. REGISTERED users of the units may obtain the latest
version and/or source code of the procedures from Brian's board. Settings
for the Final Frontier BBS are 1200-2400-9600 baud, N-8-1.
We also wish to thank George Butts of the BufferBoard BBS in Oregon (503)
747-7636 for his review of the code and constructive criticism and
recommended code improvements.
Compiling Notes:
COLOR55.PAS requires the Technojock(tm) Toolkit to re-compile the source
code. CALC55.PAS requires the Technojock(tm) Toolkit and Turbo
Professional 5.0 BCD unit and Technojock's Toolkit to re-compile
the source code.
William W. Miller, Jr.
February 01, 1990
Version 1.0
FINAL FRONTIER SOFTWARE
TURBO PASCAL UNITS
REGISTRATION FORM
VERSION 1.0
Name: ________________________________ Please return this
form along with a
Address: ________________________________ check or money order
to:
City: ________________________________
William W. Miller, Jr.
524 Rock Avenue
State: ________________________________ Chestertown, New York
12817
ZipCode: ________________________________
I enclose a check or money order to register my copy of my
addon units for Turbo Pascal.
I would like to register:
COLOR @ $5.00 ___________ 5.25" DISK _____
CALC @ $5.00 ___________ 3.5" DISK _____
Both units @ $7.50 ___________
Comments: ____________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
Bug or Problem Report: _______________________________________
______________________________________________________________
______________________________________________________________
Suggested procedures for another FFSPAS unit: ________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
(C) Copyright 1990 Final Frontier Software All Rights Res. Page 14